  function x_x = cutoff_imo_x(P,Y,params)
    % Objective: Given the price index, calculate export cutoffs
    % Output: x_x (KxK)    
    K = params.K;
    s = params.sigma;
    phi = params.phi;
    L = params.L;
    Cx = params.Cx;
    Tau = params.Tau;
    t = params.t;
    delta1 = params.delta1;
    mu = params.mu;
 
    sig_tilda = s/(s-1);
    j = 1/((phi-1)*(s-1));
    Psi = (s/mu)^j*(s-1)/s;
    x_x = (Psi.*repmat(P',K,1).^(1/(1-phi))./Tau.*Cx.^j.*repmat(Y',K,1).^(-j)-t./Tau).^(-1);   
    x_x(x_x<0) = 20;

    % Cutoffs between 0 and 1 are 1, since no mass between 0 and 1
    x_x(x_x<1 & x_x>=0) = 1;   
  end